
<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>5. Documentation &#8212; onusim  documentation</title>
    <link rel="stylesheet" href="../_static/nature.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../_static/extra.css" />
    <script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script src="../_static/jquery.js"></script>
    <script src="../_static/underscore.js"></script>
    <script src="../_static/doctools.js"></script>
    <script src="../_static/language_data.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="prev" title="4. Modules" href="../obbaa_onusim/index.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../obbaa_onusim/index.html" title="4. Modules"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">onusim  documentation</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href=""><span class="section-number">5. </span>Documentation</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <p>[toc]</p>
<div class="section" id="documentation">
<h1><span class="section-number">5. </span>Documentation<a class="headerlink" href="#documentation" title="Permalink to this headline">¶</a></h1>
<p>The documentation is generated using the <a class="reference external" href="https://www.sphinx-doc.org">sphinx</a> tool, plus some extensions to allow use of:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://python-markdown.github.io">Markdown</a> rather than <a class="reference external" href="https://docutils.sourceforge.io/rst.html">reStructuredText</a></p></li>
<li><p><a class="reference external" href="http://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings">Google-style</a> python docstrings</p></li>
<li><p>Python <a class="reference external" href="https://docs.python.org/3.6/library/typing.html">type hints</a></p></li>
</ul>
<p>I&rsquo;ve used python 3.6 to develop the code but it&rsquo;s known to work with python 3.8.</p>
<div class="section" id="installation">
<h2><span class="section-number">5.1. </span>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
<p>The easiest way to see how to install the tools locally is to look at the <a class="reference external" href="https://hub.docker.com/repository/docker/broadbandforum/sphinx">broadbandforum/sphinx</a> DockerHub repository&rsquo;s <a class="reference external" href="https://code.broadband-forum.org/projects/SOFTWARE/repos/tools/browse/sphinx/Dockerfile">Dockerfile</a>. You can then perform the same steps on your development system.</p>
<p>Alternatively, you can run the tools in the above Docker image (see the next section).</p>
<p>Here&rsquo;s the current Dockerfile with some comments. My initial attempt to upstream my various fixes and extensions didn&rsquo;t go very well. I&rsquo;ll try again later.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span># Dockerfile for sphinx
ARG FROM=ubuntu:latest
FROM $FROM

# install OS packages and create directories
RUN apt-get update \
 &amp;&amp; DEBIAN_FRONTEND=noninteractive apt-get --yes install \
        git \
        make \
        pandoc \
        python3 \
        python3-pip \
 &amp;&amp; apt-get clean \
 &amp;&amp; mkdir -p \
          /opt \
          /opt/sphinx
</pre></div>
</div>
<p>This is a modified version of the standard python markdown parser. The modification is to relax the &ldquo;fenced code&rdquo; language pattern so that the sphinx-markdown-parser (below) will work properly.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># install markdown parser</span>
<span class="n">RUN</span> <span class="n">git</span> <span class="o">-</span><span class="n">C</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sphinx</span> \
        <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">BroadbandForum</span><span class="o">/</span><span class="n">markdown</span><span class="o">.</span><span class="n">git</span> \
 <span class="o">&amp;&amp;</span> <span class="n">git</span> <span class="o">-</span><span class="n">C</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sphinx</span><span class="o">/</span><span class="n">markdown</span> \
        <span class="n">checkout</span> <span class="n">feature</span><span class="o">/</span><span class="n">relax</span><span class="o">-</span><span class="n">fenced</span><span class="o">-</span><span class="n">code</span><span class="o">-</span><span class="n">lang</span><span class="o">-</span><span class="n">pattern</span> \
 <span class="o">&amp;&amp;</span> <span class="n">pip3</span> <span class="n">install</span> <span class="o">--</span><span class="n">upgrade</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sphinx</span><span class="o">/</span><span class="n">markdown</span>
</pre></div>
</div>
<p>This is sphinx itself, with a minor bug fix.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># install sphinx and extensions</span>
<span class="c1"># XXX sphinx-markdown-parser doesn&#39;t pull in the core markdown support</span>
<span class="n">RUN</span> <span class="n">git</span> <span class="o">-</span><span class="n">C</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sphinx</span> \
        <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">BroadbandForum</span><span class="o">/</span><span class="n">sphinx</span><span class="o">.</span><span class="n">git</span> \
 <span class="o">&amp;&amp;</span> <span class="n">git</span> <span class="o">-</span><span class="n">C</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sphinx</span><span class="o">/</span><span class="n">sphinx</span> \
        <span class="n">checkout</span> <span class="n">feature</span><span class="o">/</span><span class="n">fix</span><span class="o">-</span><span class="n">tab</span><span class="o">-</span><span class="n">width</span><span class="o">-</span><span class="n">bug</span> \
 <span class="o">&amp;&amp;</span> <span class="n">pip3</span> <span class="n">install</span> <span class="o">--</span><span class="n">upgrade</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sphinx</span><span class="o">/</span><span class="n">sphinx</span>
</pre></div>
</div>
<p>This is a sphinx extension for using python type hints. I had to fix a bug.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">RUN</span> <span class="n">git</span> <span class="o">-</span><span class="n">C</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sphinx</span> \
        <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">BroadbandForum</span><span class="o">/</span><span class="n">sphinx</span><span class="o">-</span><span class="n">autodoc</span><span class="o">-</span><span class="n">typehints</span><span class="o">.</span><span class="n">git</span> \
 <span class="o">&amp;&amp;</span> <span class="n">git</span> <span class="o">-</span><span class="n">C</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sphinx</span><span class="o">/</span><span class="n">sphinx</span><span class="o">-</span><span class="n">autodoc</span><span class="o">-</span><span class="n">typehints</span> \
        <span class="n">checkout</span> <span class="n">feature</span><span class="o">/</span><span class="n">investigate</span><span class="o">-</span><span class="n">crash</span> \
 <span class="o">&amp;&amp;</span> <span class="n">pip3</span> <span class="n">install</span> <span class="o">--</span><span class="n">upgrade</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sphinx</span><span class="o">/</span><span class="n">sphinx</span><span class="o">-</span><span class="n">autodoc</span><span class="o">-</span><span class="n">typehints</span>
</pre></div>
</div>
<p>This is a sphinx extension for pulling documentation from usages of the python <code class="docutils literal notranslate"><span class="pre">argparse</span></code> (argument parser) module. I had to fix a problem.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">RUN</span> <span class="n">git</span> <span class="o">-</span><span class="n">C</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sphinx</span> \
        <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">BroadbandForum</span><span class="o">/</span><span class="n">sphinx</span><span class="o">-</span><span class="n">argparse</span> \
 <span class="o">&amp;&amp;</span> <span class="n">git</span> <span class="o">-</span><span class="n">C</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sphinx</span><span class="o">/</span><span class="n">sphinx</span><span class="o">-</span><span class="n">argparse</span> \
        <span class="n">checkout</span> <span class="n">feature</span><span class="o">/</span><span class="n">ensure</span><span class="o">-</span><span class="n">unique</span><span class="o">-</span><span class="n">ids</span> \
 <span class="o">&amp;&amp;</span> <span class="n">pip3</span> <span class="n">install</span> <span class="o">--</span><span class="n">upgrade</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sphinx</span><span class="o">/</span><span class="n">sphinx</span><span class="o">-</span><span class="n">argparse</span>
</pre></div>
</div>
<p>And finally, this is a sphinx extension that supports using markdown rather than reStructuredText. I made various improvements.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">RUN</span> <span class="n">git</span> <span class="o">-</span><span class="n">C</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sphinx</span> \
        <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">BroadbandForum</span><span class="o">/</span><span class="n">sphinx</span><span class="o">-</span><span class="n">markdown</span><span class="o">-</span><span class="n">parser</span><span class="o">.</span><span class="n">git</span> \
 <span class="o">&amp;&amp;</span> <span class="n">git</span> <span class="o">-</span><span class="n">C</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sphinx</span><span class="o">/</span><span class="n">sphinx</span><span class="o">-</span><span class="n">markdown</span><span class="o">-</span><span class="n">parser</span> \
        <span class="n">checkout</span> <span class="n">feature</span><span class="o">/</span><span class="n">misc</span><span class="o">-</span><span class="n">improvements</span> \
 <span class="o">&amp;&amp;</span> <span class="n">pip3</span> <span class="n">install</span> <span class="o">--</span><span class="n">upgrade</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">sphinx</span><span class="o">/</span><span class="n">sphinx</span><span class="o">-</span><span class="n">markdown</span><span class="o">-</span><span class="n">parser</span>
</pre></div>
</div>
</div>
<div class="section" id="invocation">
<h2><span class="section-number">5.2. </span>Invocation<a class="headerlink" href="#invocation" title="Permalink to this headline">¶</a></h2>
<div class="section" id="locally">
<h3>Locally<a class="headerlink" href="#locally" title="Permalink to this headline">¶</a></h3>
<p>The top-level <code class="docutils literal notranslate"><span class="pre">makefile</span></code> supports the various <a class="reference external" href="https://www.sphinx-doc.org/en/master/man/sphinx-build.html">sphinx-build</a> targets, and the default <code class="docutils literal notranslate"><span class="pre">html</span></code> target will generate HTML documentation in the <code class="docutils literal notranslate"><span class="pre">docs/html</span></code> directory. There&rsquo;s also a <code class="docutils literal notranslate"><span class="pre">clean</span></code> target.</p>
<p>Here&rsquo;s an example. In this only one file has been modified (this one).</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">make</span>
<span class="n">Running</span> <span class="n">Sphinx</span> <span class="n">v3</span><span class="o">.</span><span class="mf">1.0</span><span class="o">+</span>
<span class="n">loading</span> <span class="n">pickled</span> <span class="n">environment</span><span class="o">...</span> <span class="n">done</span>
<span class="n">building</span> <span class="p">[</span><span class="n">mo</span><span class="p">]:</span> <span class="n">targets</span> <span class="k">for</span> <span class="mi">0</span> <span class="n">po</span> <span class="n">files</span> <span class="n">that</span> <span class="n">are</span> <span class="n">out</span> <span class="n">of</span> <span class="n">date</span>
<span class="n">building</span> <span class="p">[</span><span class="n">html</span><span class="p">]:</span> <span class="n">targets</span> <span class="k">for</span> <span class="mi">1</span> <span class="n">source</span> <span class="n">files</span> <span class="n">that</span> <span class="n">are</span> <span class="n">out</span> <span class="n">of</span> <span class="n">date</span>
<span class="n">updating</span> <span class="n">environment</span><span class="p">:</span> <span class="mi">0</span> <span class="n">added</span><span class="p">,</span> <span class="mi">1</span> <span class="n">changed</span><span class="p">,</span> <span class="mi">0</span> <span class="n">removed</span>
<span class="n">reading</span> <span class="n">sources</span><span class="o">...</span> <span class="p">[</span><span class="mi">100</span><span class="o">%</span><span class="p">]</span> <span class="n">usage</span><span class="o">/</span><span class="n">documentation</span>                                                                                                                                  
<span class="n">looking</span> <span class="k">for</span> <span class="n">now</span><span class="o">-</span><span class="n">outdated</span> <span class="n">files</span><span class="o">...</span> <span class="n">none</span> <span class="n">found</span>
<span class="n">pickling</span> <span class="n">environment</span><span class="o">...</span> <span class="n">done</span>
<span class="n">checking</span> <span class="n">consistency</span><span class="o">...</span> <span class="n">done</span>
<span class="n">preparing</span> <span class="n">documents</span><span class="o">...</span> <span class="n">done</span>
<span class="n">writing</span> <span class="n">output</span><span class="o">...</span> <span class="p">[</span><span class="mi">100</span><span class="o">%</span><span class="p">]</span> <span class="n">usage</span><span class="o">/</span><span class="n">documentation</span>                                                                                                                                   
<span class="n">generating</span> <span class="n">indices</span><span class="o">...</span>  <span class="n">genindex</span> <span class="n">py</span><span class="o">-</span><span class="n">modindexdone</span>
<span class="n">writing</span> <span class="n">additional</span> <span class="n">pages</span><span class="o">...</span>  <span class="n">searchdone</span>
<span class="n">copying</span> <span class="n">static</span> <span class="n">files</span><span class="o">...</span> <span class="o">...</span> <span class="n">done</span>
<span class="n">copying</span> <span class="n">extra</span> <span class="n">files</span><span class="o">...</span> <span class="n">done</span>
<span class="n">dumping</span> <span class="n">search</span> <span class="n">index</span> <span class="ow">in</span> <span class="n">English</span> <span class="p">(</span><span class="n">code</span><span class="p">:</span> <span class="n">en</span><span class="p">)</span><span class="o">...</span> <span class="n">done</span>
<span class="n">dumping</span> <span class="nb">object</span> <span class="n">inventory</span><span class="o">...</span> <span class="n">done</span>
<span class="n">build</span> <span class="n">succeeded</span><span class="o">.</span>

<span class="n">The</span> <span class="n">HTML</span> <span class="n">pages</span> <span class="n">are</span> <span class="ow">in</span> <span class="n">docs</span><span class="o">/</span><span class="n">html</span><span class="o">.</span>
</pre></div>
</div>
</div>
<div class="section" id="in-docker">
<h3>In docker<a class="headerlink" href="#in-docker" title="Permalink to this headline">¶</a></h3>
<p>You can use the <a class="reference external" href="https://hub.docker.com/repository/docker/broadbandforum/sphinx">broadbandforum/sphinx</a> DockerHub image. For example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>% docker container run -it --name sphinx --rm \
    -v $MYROOT:$MYROOT -w $PWD -e PYTHONPATH broadbandforum/sphinx make
</pre></div>
</div>
<p>This assumes that you&rsquo;ve:</p>
<ul class="simple">
<li><p>Set the <code class="docutils literal notranslate"><span class="pre">MYROOT</span></code> environment variable to point to a location in your local filesystem that should be mounted in the Docker image (the <code class="docutils literal notranslate"><span class="pre">-v</span></code> option handles this; the <code class="docutils literal notranslate"><span class="pre">-w</span></code> option sets the working directory)</p></li>
<li><p>Defined the <code class="docutils literal notranslate"><span class="pre">PYTHONPATH</span></code> variable appropriately (the <code class="docutils literal notranslate"><span class="pre">-e</span></code> option passes it to Docker)</p></li>
</ul>
<p>Here&rsquo;s a clean build in Docker:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>% docker container run -it --name sphinx --rm -v $MYROOT:$MYROOT -w $PWD -e PYTHONPATH broadbandforum/sphinx make clean html
Removing everything under &#39;docs&#39;...
Running Sphinx v3.1.0+
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 6 source files that are out of date
updating environment: [new config] 6 added, 0 changed, 0 removed
annotation typing.IO[str] module &#39;typing&#39; class_name &lt;property object at 0x7f3a3b766220&gt; &lt;class &#39;property&#39;&gt;                                                                    
annotation typing.IO[str] module &#39;typing&#39; class_name &lt;property object at 0x7f3a3b766220&gt; &lt;class &#39;property&#39;&gt;
annotation typing.IO[str] module &#39;typing&#39; class_name &lt;property object at 0x7f3a3b766220&gt; &lt;class &#39;property&#39;&gt;
reading sources... [100%] usage/introduction                                                                                                                                   
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] usage/introduction                                                                                                                                    
generating indices...  genindex py-modindexdone
writing additional pages...  searchdone
copying static files... ... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in docs/html.
</pre></div>
</div>
<p>The three <code class="docutils literal notranslate"><span class="pre">annotation</span></code> warnings are because Docker is using python 3.8, which exposes some debug output from a temporary crash-avoidance fix that I had to add.</p>
</div>
</div>
<div class="section" id="adding-documentation">
<h2><span class="section-number">5.3. </span>Adding documentation<a class="headerlink" href="#adding-documentation" title="Permalink to this headline">¶</a></h2>
<p>New documentation will either be hand-written markdown (like this file) or else will be code documentation.</p>
<div class="section" id="overview">
<h3>Overview<a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h3>
<p>To add new files to the documentation, edit the top-level <code class="docutils literal notranslate"><span class="pre">index.md</span></code>. Stick to the current conventions, even if they might look a bit strange. This section specifies the &ldquo;toctree&rdquo; (documentation content):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">*</span> <span class="p">[](</span><span class="n">usage</span><span class="o">/</span><span class="n">introduction</span><span class="p">)</span>
<span class="o">*</span> <span class="p">[](</span><span class="n">usage</span><span class="o">/</span><span class="n">extensions</span><span class="p">)</span>
<span class="o">*</span> <span class="p">[](</span><span class="nb">bin</span><span class="o">/</span><span class="n">index</span><span class="p">)</span>
<span class="o">*</span> <span class="p">[](</span><span class="n">obbaa_onusim</span><span class="o">/</span><span class="n">index</span><span class="p">)</span>
<span class="o">*</span> <span class="p">[](</span><span class="n">usage</span><span class="o">/</span><span class="n">documentation</span><span class="p">)</span>
</pre></div>
</div>
<p>In order to add this file, I added the last line (the files in the <code class="docutils literal notranslate"><span class="pre">usage</span></code> directory are hand-written markdown).</p>
<p>The third and fourth lines bring in the code documentation. For example, <code class="docutils literal notranslate"><span class="pre">bin/index.md</span></code> is shown below. It&rsquo;s basically markdown, but is interspersed with reStructuredText directives courtesy of <a class="reference external" href="https://recommonmark.readthedocs.io/en/latest/auto_structify.html">AutoStructify</a>, e.g., <code class="docutils literal notranslate"><span class="pre">automodule::</span> <span class="pre">bin.onusim</span></code> inserts the automatically-generated documentation for the <code class="docutils literal notranslate"><span class="pre">bin.onusim</span></code> python modiule.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span># Scripts

## ONU simulation server

``` automodule:: bin.onusim
```

**Usage**

``` argparse::
    :ref: bin.onusim.argparser
    :prog: onusim
    :nodescription:
    :nodefault:
```

## ONU test client

``` automodule:: bin.onucli
```

**Usage**

``` argparse::
    :ref: bin.onucli.argparser
    :prog: onucli
    :nodescription:
    :nodefault:
```
</pre></div>
</div>
</div>
<div class="section" id="python-docstrings">
<h3>Python docstrings<a class="headerlink" href="#python-docstrings" title="Permalink to this headline">¶</a></h3>
<p>The basic rule is to use <a class="reference external" href="http://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings">Google-style</a> docstrings, but to understand that you can also use some magic reStructuredText directives. You&rsquo;ll see examples of all this in the existing code. Here are some examples.</p>
<p>A section name followed by a colon will be formatted specially (I don&rsquo;t even know whether they have to be known names or whether it&rsquo;s the colon that&rsquo;s special).</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Examples</span><span class="p">:</span>

    <span class="n">These</span> <span class="n">examples</span> <span class="n">assume</span> <span class="n">that</span> <span class="n">an</span> <span class="n">ONU</span> <span class="n">simulator</span> <span class="n">instance</span> <span class="ow">is</span> <span class="n">listening</span> <span class="n">on</span> <span class="n">the</span>
    <span class="n">default</span> <span class="n">address</span> <span class="ow">and</span> <span class="n">port</span><span class="o">.</span> <span class="n">If</span> <span class="ow">not</span><span class="p">,</span> <span class="n">commands</span> <span class="n">will</span> <span class="n">time</span> <span class="n">out</span> <span class="n">after</span> <span class="mi">10</span> <span class="n">seconds</span><span class="o">.</span>

</pre></div>
</div>
<p>A section name followed by two colons will cause its body to be formatted verbatim:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>    <span class="n">Get</span> <span class="p">(</span><span class="n">using</span> <span class="nb">all</span> <span class="n">defaults</span><span class="p">)::</span>

        <span class="o">%</span> <span class="o">./</span><span class="n">onucli</span><span class="o">.</span><span class="n">py</span> <span class="n">get</span>
</pre></div>
</div>
<p>Single back-quotes are cross-references. You can reference module names, class names etc., and it usually &ldquo;just works&rdquo;. If a reference isn&rsquo;t found, you&rsquo;ll get a sphinx warning. See the <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-any">sphinx roles</a> documentation for details.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>This will currently only really work on the server side, but it makes sense
also to have a client-side database, populated via `get &lt;get_action&gt;` and
`MIB upload &lt;mib_upload_action&gt;` actions.
</pre></div>
</div>
<p>Two back-quotes indicate a fixed-width font.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>    The returned attribute mask is ``0xf600``, indicating that the
    response includes ONU-G attributes 1-4, 6 and 7
</pre></div>
</div>
</div>
</div>
</div>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">5. Documentation</a><ul>
<li><a class="reference internal" href="#installation">5.1. Installation</a></li>
<li><a class="reference internal" href="#invocation">5.2. Invocation</a><ul>
<li><a class="reference internal" href="#locally">Locally</a></li>
<li><a class="reference internal" href="#in-docker">In docker</a></li>
</ul>
</li>
<li><a class="reference internal" href="#adding-documentation">5.3. Adding documentation</a><ul>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#python-docstrings">Python docstrings</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="../obbaa_onusim/index.html"
                        title="previous chapter"><span class="section-number">4. </span>Modules</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/usage/documentation.md.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../obbaa_onusim/index.html" title="4. Modules"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">onusim  documentation</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href=""><span class="section-number">5. </span>Documentation</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2020, Broadband Forum.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.0+.
    </div>
  </body>
</html>